package com.springcloud.sc.ucpv5.client.application.message.type;

import java.nio.ByteBuffer;
import java.nio.ByteOrder;

public abstract class NumberWrap extends WrapPublic {

    /**
     * 根据配置来确定是否转网络字节序
     * 
     * @param buffer
     * @param key
     *            包含所有该类型所需的属性条件
     * @return
     */
    @SuppressWarnings("unused")
    protected static ByteBuffer makeByteOrder(ByteBuffer buffer, boolean isOrder) {
	// 得到是否需要转字节序属性值
	// boolean isOrder = Boolean.parseBoolean(key.getAttribute("isOrder"));
	if (isOrder) {
	    buffer.order(ByteOrder.LITTLE_ENDIAN);
	}
	return buffer;
    }
}
